﻿namespace Steamworks
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct UGCFileWriteStreamHandle_t : IEquatable<UGCFileWriteStreamHandle_t>, IComparable<UGCFileWriteStreamHandle_t>
    {
        public static readonly UGCFileWriteStreamHandle_t Invalid;
        public ulong m_UGCFileWriteStreamHandle;
        public UGCFileWriteStreamHandle_t(ulong value)
        {
            this.m_UGCFileWriteStreamHandle = value;
        }

        static UGCFileWriteStreamHandle_t()
        {
            Invalid = new UGCFileWriteStreamHandle_t(ulong.MaxValue);
        }

        public override string ToString()
        {
            return this.m_UGCFileWriteStreamHandle.ToString();
        }

        public override bool Equals(object other)
        {
            return ((other is UGCFileWriteStreamHandle_t) && (this == ((UGCFileWriteStreamHandle_t) other)));
        }

        public override int GetHashCode()
        {
            return this.m_UGCFileWriteStreamHandle.GetHashCode();
        }

        public bool Equals(UGCFileWriteStreamHandle_t other)
        {
            return (this.m_UGCFileWriteStreamHandle == other.m_UGCFileWriteStreamHandle);
        }

        public int CompareTo(UGCFileWriteStreamHandle_t other)
        {
            return this.m_UGCFileWriteStreamHandle.CompareTo(other.m_UGCFileWriteStreamHandle);
        }

        public static bool operator ==(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y)
        {
            return (x.m_UGCFileWriteStreamHandle == y.m_UGCFileWriteStreamHandle);
        }

        public static bool operator !=(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y)
        {
            return !(x == y);
        }

        public static explicit operator UGCFileWriteStreamHandle_t(ulong value)
        {
            return new UGCFileWriteStreamHandle_t(value);
        }

        public static explicit operator ulong(UGCFileWriteStreamHandle_t that)
        {
            return that.m_UGCFileWriteStreamHandle;
        }
    }
}

